function [ imgGray ] = my_RGB2Gray( img )
%MY_RGBTOGRAY converts the RGB image to a grayscale image.
% before the conversion a gamma correction is performed.
i = my_gammaCorrection(img);

%Grey = 0.2989 * R + 0.5870 * G + 0.1140 * B 

imgGray = 0.2989 * i(:,:,1) + 0.5870* i(:,:,2) + 0.1140* i(:,:,3);


end

